#include <cstdio>
#include <cstring>
using namespace std;

int input = 0;

bool isOushu(int input){
    return input % 2 == 0;
}

int main() {
    int step = 0;
    scanf("%d", &input);
    while(input != 1){
        input = isOushu(input)?(input / 2):(3 * input + 1) / 2;
        step++;
    }
    printf("%d\n", step);
}
